<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义指令 directive 的 restrict属性说明</title>
    <script src="../angular.js"></script>
</head>
<body>
<div ng-app="gg">
    <div guoguo></div>
    <hr />
    <h1 guoguo></h1>
</div>

<script>
    var mod = angular.module('gg', []);

    mod.directive('guoguo', [function () {
        console.log(11);

        return {
            restrict : 'AE', //指令在页面当中的表现形式  a attr; e element; c class
            template: '测试代码'  //指令在页面当中显示的内容
        }

    }])
</script>
</body>
</html>